package com.trf.fm1;

/**
 * @author 小小唐
 * @Date 2022/9/19-星期一-20:20
 *
 * while循环
 * 实现1到100累加的运算
 */
public class WhileDemo {
    public static void main(String[] args) {
        int i = 1;
        int sum = 0;
        while (i<=100){
            sum+=i;
            i++;
        }
        System.out.println("1到100累加和是："+sum);
    }
}
